Post

Replies

Boosts

Views

Activity

Reply to What steps to perform for the upcoming changes to the App Store receipt signing intermediate certificate?
Yes, my app relies on having an internet connection while it is running. But my concern here is that, Should I continue using the verifyReceipt endpoint from the device? Or Should I plan to use the verifyReceipt endpoint from my server? Or Should I plan to use the App Store Server API and App Store Server Notifications V2?
Jul ’23
Reply to What steps to perform for the upcoming changes to the App Store receipt signing intermediate certificate?
Thank you both of you for the reply, I have got your point that I am sending the receipt to Apple for validation, and this change will not affect my application. This is very helpful to me. As I see this documentation Validating receipts with the App Store, It is saying that The verifyReceipt endpoint is deprecated So Is there any end date from which this endpoint will not work? What should I do? Should I continue using the verifyReceipt endpoint from the device? Or Should I plan to use the verifyReceipt endpoint from my server? Or Should I plan to use the App Store Server API and App Store Server Notifications V2? Can you please share your feedback on this?
Jul ’23
Reply to What steps to perform for the upcoming changes to the App Store receipt signing intermediate certificate?
Thank you @endecotp for your reply, Currently I am using SwiftyStoreKit to handle In-App Purchases. To make the In-App Purchase, I am calling SwiftyStoreKit's purchaseProduct(_ product: SKProduct) method, And once I get the success response from this method, I am validating the receipt to validate the purchase by this SwiftyStoreKit's verifyReceipt(using validator: ReceiptValidator) method, Which first fetches the appStoreReceiptData from the Bundle as below, var appStoreReceiptData: Data? { guard let receiptDataURL = Bundle.main.appStoreReceiptURL, let data = try? Data(contentsOf: receiptDataURL) else { return nil } return data } Then to validate the receipt data, calls the verifyReceipt endpoint https://buy.itunes.apple.com/verifyReceipt as below, let storeURL = URL(string: "https://buy.itunes.apple.com/verifyReceipt")! let storeRequest = NSMutableURLRequest(url: storeURL) storeRequest.httpMethod = "POST" let receipt = appStoreReceiptData.base64EncodedString(options: []) let requestContents: NSMutableDictionary = [ "receipt-data": receipt ] // password if defined if let password = sharedSecret { requestContents.setValue(password, forKey: "password") } // Encore request body do { storeRequest.httpBody = try JSONSerialization.data(withJSONObject: requestContents, options: []) } catch let e { completion(.error(error: .requestBodyEncodeError(error: e))) return } // Remote task let task = URLSession.shared.dataTask(with: storeRequest as URLRequest) { data, _, error -> Void in } task.resume() And once I got the successful validation response from the above method, I unlock the pro content for the user in the application. Can you please let me know how can I know that how I am validating the certificate? Also, can you please check the above things, and let me know if I still needs any changes on receipt validation? Thanks again.
Jul ’23